package com.coincalf.wallet.blockchain;

import java.math.BigDecimal;

public class BlockConstant {

    /**
     * AES加密解密key
     */
    public static final String AES_KEY = "dqe$c{h*a@n~g6ep";

    /**
     * USDT_ERC20合约地址
     */
    public static final String USDT_ERC20_ADDRESS = "0xdac17f958d2ee523a2206206994597c13d831ec7";

    /**
     * USDT_TRC20合约地址
     */
    public static final String USDT_TRC20_ADDRESS = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t";

    /**
     * ETH系列单位转换
     */
    public static BigDecimal WEI = new BigDecimal("1000000000000000000");

    public static final BigDecimal USDT_ERC20_RATIO = new BigDecimal("1000000");

    /**
     * ERC20代币查询余额固定前缀
     */
    public static final String DATA_PREFIX = "0x70a08231000000000000000000000000";


    /**
     * 余额
     */
    public static final String BALANCE = "balance";

    /**
     * 交易确认数
     */
    public static final String CONFIRMATIONS = "confirmations";

    /**
     * 手续费
     */
    public static final String FEE = "fee";

    /**
     * 区块hash
     */
    public static final String BLOCK_HASH = "blockhash";

    /**
     * 收款地址
     */
    public static final String TO_ADDRESS = "referenceaddress";

    /**
     * 转账地址
     */
    public static final String FROM_ADDRESS = "sendingaddress";

    /**
     * 交易金额
     */
    public static final String AMOUNT = "amount";

    /**
     * 区块时间
     */
    public static final String BLOCK_TIME = "blocktime";

    /**
     * 区块高度
     */
    public static final String BLOCK = "block";

    /**
     * 交易id(hash)
     */
    public static final String TX_ID = "txid";

    /**
     * 交易脚本固定前缀
     */
    public static final String HEX_SCRIPT = "6a146f6d6e69";

    public static final String STRING_FORMAT = "%016x";

    //BTC转账最小金额 单位:BTC
    public static final BigDecimal BTC_TX_MIN_AMOUNT = new BigDecimal("0.00000546");

    /**
     * 生成新地址
     */
    public static final String GET_NEW_ADDRESS = "getnewaddress";

    /**
     * 查询余额
     */
    public static final String GET_BALANCE = "omni_getbalance";

    /**
     * 发送交易
     */
    public static final String SEND_TRANSACTION = "omni_send";

    /**
     * 发送交易并指定手续费地址
     */
    public static final String FUNDED_SEND_TRANSACTION = "omni_funded_send";

    /**
     * 查询交易详情
     */
    public static final String GET_TRANSACTION = "omni_gettransaction";

    /**
     * 通过地址查询账户
     */
    public static final String GET_ADDRESSES_BY_ACCOUNT = "getaddressesbyaccount";

    /**
     * 列出区块所有交易hash
     */
    public static final String LIST_BLOCK_TRANSACTIONS = "omni_listblocktransactions";

    /**
     * 构建有效载荷
     */
    public static final String OMNI_CREATEPAYLOAD_SIMPLESEND = "omni_createpayload_simplesend";

    /**
     * 构建交易基础
     */
    public static final String CREATE_RAW_TRANSACTION = "createrawtransaction";

    /**
     * 附加有效载荷输出
     */
    public static final String OMNI_CREATERAWTX_OPRETURN = "omni_createrawtx_opreturn";

    /**
     * 连接参考/接收器输出
     */
    public static final String OMNI_CREATERAWTX_REFERENCE = "omni_createrawtx_reference";

    /**
     * 签名交易
     */
    public static final String SIGN_RAW_TRANSACTION = "signrawtransaction";

    /**
     * 广播交易
     */
    public static final String SEND_RAW_TRANSACTION = "sendrawtransaction";

    /**
     * 指定矿工费并附加变更输出(根据需要) 找零
     */
    public static final String OMNI_CREATE_RAWTX_CHANGE = "omni_createrawtx_change";

    /**
     * 31代表USDT主网 1，2 代表测试网
     */
    public static final int PROPERTY_ID = 31;

    public static final BigDecimal SATOSHIS = BigDecimal.valueOf(100000000);

    public static final BigDecimal SUN = BigDecimal.valueOf(1000000);


    //各币种最小充币数量 低于该数量不为用户增加余额
    public static final BigDecimal MIN_RECHARGE_ETH_AMOUNT = new BigDecimal("0.01");
    public static final BigDecimal MIN_RECHARGE_USDT_ERC20_AMOUNT = new BigDecimal("1");
    public static final BigDecimal MIN_RECHARGE_TRX_AMOUNT = new BigDecimal("5");
    public static final BigDecimal MIN_RECHARGE_USDT_TRC20_AMOUNT = new BigDecimal("1");
    public static final BigDecimal MIN_RECHARGE_BTC_AMOUNT = new BigDecimal("0.0005");
    public static final BigDecimal MIN_RECHARGE_USDT_OMNI_AMOUNT = new BigDecimal("1");

}
